﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PowerEx
{
    public partial class Form1 : Form
    {
        public Button View { get; private set; }
        public Button Run { get; private set; }
        public Button Copy { get; private set; }
        public Button B_Move { get; private set; }
        public Button MkDir { get; private set; }
        public Button Rename { get; private set; }
        public ListBox List1 { get; private set; }
        public ListBox List2 { get; private set; }
        public string ListPath1 { get; set; }
        public string ListPath2 { get; set; }
        
        public enum ActiveList
        {
            List1,
            List2
        };

        public ActiveList ListActive;

        public Form1()
        {
            InitializeComponent();
            View = button1;
            Run = button2;
            Copy = button3;
            B_Move = button4;
            MkDir = button5;
            Rename = button6;
            List1 = listBox1;
            List2 = listBox2;
            ListActive = ActiveList.List1;           
        }

        void listBox1_GotFocus(object sender, EventArgs e)
        {
            listBox2.ClearSelected();
            ListActive = ActiveList.List1;
        }
        void listBox2_GotFocus(object sender, EventArgs e)
        {
            listBox1.ClearSelected();
            ListActive = ActiveList.List2;
        }

        void listBox_DoubleClick(object sender, System.EventArgs e)
        {
            label1.Text = ListPath1;
            label2.Text = ListPath2;
        }

        void listBox_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                label1.Text = ListPath1;
                label2.Text = ListPath2;
            }
        }

        void listBox_Enter(object sender, System.EventArgs e)
        {
            label1.Text = ListPath1;
            label2.Text = ListPath2;
        }
         
    }
}
